<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
</head>
<body>
    <div id="app">
        <my-button></my-button>
    </div>
    <script type="text/template" id="tpl">
        <div>
            <button>这是一个全局按钮</button>
        </div>
    </script>
    <script>
        Vue.component('MyButton',{
          template: '#tpl'
        })
        const vm = new Vue({
          el: '#app'
        })
        
    </script>
</body>
</html>